package com.fy.tt.dao;

import com.fy.toolhelper.db.IBaseDao;
import com.fy.tt.entity.Semantic;
import com.fy.tt.entity.query.SemanticQuery;
import com.fy.tt.entity.vo.SemanticVo;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface SemanticDao extends IBaseDao<Semantic> {
    /*
    *   按照注册词汇开发状态分为两类：
    *       1. 未开发，需要添加词汇语义；
    *       2. 已开发，需要查看、修改、删除词汇语义。
    * */
    Semantic getSemantic(Connection connection, int wordId) throws SQLException;
    int deleteSemantic(Connection connection, int wordId) throws SQLException;
    int updateIsTypeInByWordId(Connection connection, int wordId, int isTypeIn) throws SQLException;

    List<SemanticVo> getAllSemantics(Connection connection) throws SQLException;

    int getTotalSemantic(Connection connection, SemanticQuery semanticQuery) throws SQLException;

    int getTotalSemanticDeveloped(Connection connection, SemanticQuery semanticQuery) throws SQLException;
}
